<?=use_lightbox()?>
<script language='javascript' type='text/javascript' src="<?=base_url('get_images')?>scripts/get_image.js"></script>

<script language='javascript' type='text/javascript' src="<?=base_url('products')?>scripts/products.js"></script>
<?php echo form_open($this->products_detail_model->url_prefix, array('enctype'=>'multipart/form-data')); ?>
<?if($msg){?><center><div class="messageBox"><?=$msg?></div></center><?}?>
<table border="0" cellspacing="0" cellpadding="0" class="infoTable">
  <tr>
    <td id='infoStr'>Tên hàng *:</td>
    <td id='infoInput' align='left'><input name="name" id="name" type="text" value="<?=h($name)?>" size="30" /></td>
  </tr>
  
  <tr>
    <td id='infoStr'>Image :</td>
    <td id='infoInput' align='left'>
    	
		<input type="file" size="30" name="imagepath" size="60" maxlength="255" />
		<br>
		<!--
		<input value='{imagepath}' name="imagepath" id="imagepath" size="60" maxlength="255" /><a href="<?=base_url()?>admin_ajax/get_images.get_images/" rel="ibox&height=450"><input type="button" value="Browse" /></a><input type="button" value="remove" class="cancel_button" onclick="removeimage();" /><?=form_error('imagepath');?><br>
    	<img name="image_url" id="image_url" src="<?=base_url()?>application/assets/admin/images/non.jpg" align="top" />   
		-->	
    	
    </td>
  </tr>
  
  <tr>
    <td id='infoStr'>Nhóm hàng *:</td>
    <td id='infoInput' align='left'>
	<select name="group" id="group">
	<?$i=1;foreach($groups as $o_group){?>
	 <option value="<?=$o_group->{PRODUCT_GROUP_ID}?>" <? if($o_group->{PRODUCT_GROUP_ID}==$group) echo 'selected'; ?>><?=$o_group->product_cate_name?>>><?=$o_group->{PRODUCT_GROUP_NAME}?></option>
	<?}?>
	</select>
  </tr>
  <tr>
    <td id='infoStr'>Giá tiền:</td>
    <td id='infoInput' align='left'><input name="price" id="price" type="text" value="<?=h($price)?>" size="30" /></td>
  </tr>
  <tr>
    <td id='infoStr'>Giá Khuyến Mãi:</td>
    <td id='infoInput' align='left'><input name="promotion_price" id="promotion_price" type="text" value="<?=($promotion_price)?$promotion_price:'0'?>" size="30" /></td>
  </tr>
  <tr>
    <td id='infoStr'>Tóm tắt về tính năng:</td>
    <td id='infoInput' align='left'>{properties}</td>
  </tr>
  <tr>
    <td id='infoStr'>Thông tin sản phẩm:</td>
    <td id='infoInput' align='left'>{description}</td>
  </tr>
  <tr>
    <td id='infoStr'>Hiển thị:</td>
    <td id='infoInput' align='left'><input name="active" type="checkbox"{active} /></td>
  </tr>
  <tr>
    <td id='infoStr'>&nbsp;</td>
    <td id='infoInput' align='left'>
        <input type="button" value="Lưu" class="save_button" style="cursor:pointer" onclick="return products.saveItem({start}, {item}, '{language}')" />&nbsp;
        <input type="button" value="Quay về" class="cancel_button" style="cursor:pointer" onclick="products.cancel({start}, '{language}')" />
    </td>
  </tr>
</table>
</form>